package com.city.domain.city;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

/**
 * @deprecation: 居民房屋信息表
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
@Entity
@Table(name = "city_houseinfo", schema = "city", catalog = "")
public class CityHouseinfo {
    private int id;//主键
    private String number;//房源编号
    private int userId;//用户id
    private String province;//省份
    private String city;//市
    private String county;//县城\区
    private String town;//镇
    private String village;//村
    private String address;//详细地址
    private String houseType;//房型
    private int floor;//层数
    private int floorCount;//总层数
    private String sunrise;//朝阳
    private int areaBuild;//建筑面值,单位平方米
    private String decorationStatus;//装修状况
    private String facilities;//房屋设施
    private String status;//房主性质(房屋状态:正常,出租,求租)
    private BigDecimal price;//价格(每平方米或者总价),单位:RMB
    private BigDecimal lng;//经度
    private BigDecimal lat;//纬度
    private String updateTime;
    private String tellphone;
    private int filenumber;//所涉及的文件数量


    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "number")
    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    @Basic
    @Column(name = "user_id")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "province")
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    @Basic
    @Column(name = "city")
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    @Basic
    @Column(name = "county")
    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    @Basic
    @Column(name = "town")
    public String getTown() {
        return town;
    }

    public void setTown(String town) {
        this.town = town;
    }

    @Basic
    @Column(name = "village")
    public String getVillage() {
        return village;
    }

    public void setVillage(String village) {
        this.village = village;
    }

    @Basic
    @Column(name = "house_type")
    public String getHouseType() {
        return houseType;
    }

    public void setHouseType(String houseType) {
        this.houseType = houseType;
    }

    @Basic
    @Column(name = "floor")
    public int getFloor() {
        return floor;
    }

    public void setFloor(int floor) {
        this.floor = floor;
    }

    @Basic
    @Column(name = "floor_count")
    public int getFloorCount() {
        return floorCount;
    }

    public void setFloorCount(int floorCount) {
        this.floorCount = floorCount;
    }

    @Basic
    @Column(name = "sunrise")
    public String getSunrise() {
        return sunrise;
    }

    public void setSunrise(String sunrise) {
        this.sunrise = sunrise;
    }

    @Basic
    @Column(name = "area_build")
    public int getAreaBuild() {
        return areaBuild;
    }

    public void setAreaBuild(int areaBuild) {
        this.areaBuild = areaBuild;
    }

    @Basic
    @Column(name = "decoration_status")
    public String getDecorationStatus() {
        return decorationStatus;
    }

    public void setDecorationStatus(String decorationStatus) {
        this.decorationStatus = decorationStatus;
    }

    @Basic
    @Column(name = "facilities")
    public String getFacilities() {
        return facilities;
    }

    public void setFacilities(String facilities) {
        this.facilities = facilities;
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "price")
    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Basic
    @Column(name = "lng")
    public BigDecimal getLng() {
        return lng;
    }

    public void setLng(BigDecimal lng) {
        this.lng = lng;
    }

    @Basic
    @Column(name = "lat")
    public BigDecimal getLat() {
        return lat;
    }

    public void setLat(BigDecimal lat) {
        this.lat = lat;
    }

    @Basic
    @Column(name = "update_time")
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "filenumber")
    public int getFilenumber() {
        return filenumber;
    }

    public void setFilenumber(int filenumber) {
        this.filenumber = filenumber;
    }
    @Basic
    @Column(name = "tellphone")
    public String getTellphone() {
        return tellphone;
    }

    public void setTellphone(String tellphone) {
        this.tellphone = tellphone;
    }

    @Basic
    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CityHouseinfo that = (CityHouseinfo) o;
        return id == that.id &&
                userId == that.userId &&
                floor == that.floor &&
                floorCount == that.floorCount &&
                areaBuild == that.areaBuild &&
                filenumber == that.filenumber &&
                Objects.equals(number, that.number) &&
                Objects.equals(province, that.province) &&
                Objects.equals(city, that.city) &&
                Objects.equals(county, that.county) &&
                Objects.equals(town, that.town) &&
                Objects.equals(village, that.village) &&
                Objects.equals(address, that.address) &&
                Objects.equals(houseType, that.houseType) &&
                Objects.equals(sunrise, that.sunrise) &&
                Objects.equals(decorationStatus, that.decorationStatus) &&
                Objects.equals(facilities, that.facilities) &&
                Objects.equals(status, that.status) &&
                Objects.equals(price, that.price) &&
                Objects.equals(lng, that.lng) &&
                Objects.equals(lat, that.lat) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(tellphone, that.tellphone);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, number, userId, province, city, county, town, village, address, houseType, floor, floorCount, sunrise, areaBuild, decorationStatus, facilities, status, price, lng, lat, updateTime, tellphone, filenumber);
    }

    @Override
    public String
    toString() {
        return "CityHouseinfo{" +
                "id=" + id +
                ", number='" + number + '\'' +
                ", userId=" + userId +
                ", province='" + province + '\'' +
                ", city='" + city + '\'' +
                ", county='" + county + '\'' +
                ", town='" + town + '\'' +
                ", village='" + village + '\'' +
                ", address='" + address + '\'' +
                ", houseType='" + houseType + '\'' +
                ", floor=" + floor +
                ", floorCount=" + floorCount +
                ", sunrise='" + sunrise + '\'' +
                ", areaBuild=" + areaBuild +
                ", decorationStatus='" + decorationStatus + '\'' +
                ", facilities='" + facilities + '\'' +
                ", status='" + status + '\'' +
                ", price=" + price +
                ", lng=" + lng +
                ", lat=" + lat +
                ", updateTime='" + updateTime + '\'' +
                ", tellphone='" + tellphone + '\'' +
                ", filenumber=" + filenumber +
                '}';
    }
}
